<template>
	<view class="hecheng-view">
		<view class="hecheng-item" v-for="(item,index) in hechengs" :key="index">
			<view class="item-title">{{item.name}}</view>
			<view class="content-text">
				<block v-for="(item,index) in item.content" :key="index">
					<label class="content-main">{{item.des_a}}</label>{{item.des_text}}
				</block>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				hechengs: []
			}
		},
		onLoad(options) {
      this.$tools.showLoading()
      uniCloud.callFunction({
				name: 'database',
				data: {
					collection: 'poetry',
					type: 'hecheng',
					title: '作者合称大全'
				},
				success: (res) => {
          uni.hideLoading()
					console.log(res)
					let result = res.result.data
					if (result && result.length > 0) {
						let hechengs = result[0].hechengs
						this.hechengs = hechengs
					}

				}
			})
		},
		methods: {

		}
	}
</script>

<style>
	.hecheng-item {
		margin: 10px;
		border: 1px;
		border-radius: 2px;
		background: #efca84;
		padding: 7px;
    box-shadow: 0px 1px 5px 1px #efca84;
	}

	.item-title {
		font-size: 17px;
		font-weight: 600;
	}

	.content-text {
    font-size: 15px;
		word-break: break-all;
		word-wrap: break-word;
		white-space: normal;
		color: #666666;
	}

	.content-main {
		color: #b7706a;
	}
</style>
